import numpy as np
import math

#主代码测试
import Env.EnvMain as env
A = env.ACEnv(4,4)
dic=['我方位置',
     '敌方位置',
     '我方弹药情况',
     '我方攻击态势',
     '敌方攻击态势',
     '生存情况',
     '攻击效果我',
     '攻击效果敌']

a = A.reset()
count=0
for i in a:
    print(dic[count])
    print(i)
    count+=1
A.render()
b = A.FirstStep([[2,36],[1,50],[0,87],[3,7]])

count=0
for i in b:
    print(dic[count])
    print(i)
    count+=1
A.render()
c = A.step([[[-0.1,-0.2],[0.4,0.5],[-0.3,-0,2],[0.2,-0,1]],[[0,0,1,0],[1,0,0,0],[0,0,1,1],[0,0,0,1]]])
count=0
for i in c[0]:
    print(dic[count])
    print(i)
    count+=1
A.render()
c = A.step([[[-0.1,-0.2],[0.4,0.5],[-0.3,-0,2],[0.2,-0,1]],[[0,0,1,0],[1,0,0,0],[0,0,1,1],[0,0,0,1]]])
count=0
for i in c[0]:
    print(dic[count])
    print(i)
    count+=1
A.render()
c = A.step([[[-0.1,-0.2],[0.4,0.5],[-0.3,-0,2],[0.2,-0,1]],[[0,0,1,0],[1,0,0,0],[0,0,1,1],[0,0,0,1]]])
count=0
for i in c[0]:
    print(dic[count])
    print(i)
    count+=1
A.render()

A.excel_save()

""" # excel模块测试
import Env.Tools.ExcelFunc as xl
exc=xl.excel()
exc.out_to_excel([111,'2asd'])
exc.save()
"""
